package com.cjy.service;

import com.cjy.pojo.Blog;
import com.cjy.pojo.vo.BlogQuery;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;
import java.util.Map;

public interface BlogService {

    Blog getBlog(Long id);

    Blog saveBlog(Blog blog);

    Page<Blog> listBlog(Pageable pageable, BlogQuery blog);

    Page<Blog> listBlog(Pageable pageable);

    Page<Blog> listBlogByTypeId(Long id, Pageable pageable);

    Page<Blog> listBlogByTagId(Long id, Pageable pageable);

    List<Blog> listBlogTop(Integer size);

    Map<String,List<Blog>> archiveBlog();

    Blog updateBlog(Long id, Blog blog);

    Blog updateBlogAddLike(Long id, Blog blog);

    Blog updateBlogReduceLike(Long id, Blog blog);

    void deleteBlog(Long id);

    Page<Blog> listBlogSearch(String query, Pageable pageable);

    Blog getAndConvert(Blog blog);

    Long countBlog();


    int updateBlogViews(Long id);

    String passBlog(Long blogId);

    String rejectBlog(Long blogId, String rejectDes);

    Integer blogCountByType(Long typeId);

}
